package com.sinaapp.mspring.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sinaapp.mspring.dao.IqiyiMapper;
import com.sinaapp.mspring.pojo.Iqiyi;
import com.sinaapp.mspring.service.IqiyiServiceI;
import com.sinaapp.mspring.vo.PageParameter;

@Service
public class IqiyiServiceImpl implements IqiyiServiceI {

	@Autowired
	private IqiyiMapper dao;
	
	@Override
	public List<Iqiyi> selectList(PageParameter pageParameter) {
		Integer totolRecord = dao.count();
		pageParameter.setTotalRecord(totolRecord);
		List<Iqiyi> iqiyis = dao.selectList(pageParameter);
		return iqiyis;
	}

	@Override
	public Iqiyi selectByKey(Integer id) {
		
		return dao.selectByPrimaryKey(id);
	}

}
